//
//  DefaultTableViewCell.swift
//  RxStudy
//
//  Created by TRS-Mobile on 2024/6/12.
//  Copyright © 2024 season. All rights reserved.
//

import Foundation
import UIKit
import RxSwift
import RxCocoa

class DefaultTableViewCell: UITableViewCell {
    
    var cellDisposeBag = DisposeBag()
    var container: UIView = UIView.init()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        selectionStyle = .none
        makeUI()
    }
    
    func bind(to viewModel: DefaultTableViewCellViewModel) {
        cellDisposeBag = DisposeBag()
    }
    
    func makeUI() -> Void {
        backgroundColor = .clear
        addSubview(container)
        container.snp.makeConstraints { make in
            make.edges.equalTo(UIEdgeInsets(top: 10, left: 15, bottom: 10, right: 15))
        }
        container.backgroundColor = UIColor.sunbeam
        container.layer.cornerRadius = 8
        container.layer.masksToBounds = true
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
}
